package com.book.controller;

import com.book.entity.Book;
import org.springframework.boot.SpringApplication;
import org.springframework.web.bind.annotation.*;

@RestController
public class BookController {
	
	@GetMapping( value = "/book/{id}" )
	public Book getBook(@PathVariable("id") Integer id) {
		System.out.println("书本模块查询，书本id：" + id);
		Book book = new Book();
		book.setId(id);
		book.setName(" im a book ");
		book.setAuthor(" test ");
		return book;
	}

}
